let myMixin = {
    data() {
        return {
            loadingFlag: '',
            requestUrl: '',
            requestToken: '',
            dvLoading: false,
            loadingText: '加载中',
            modelUrl: 'http://yqqywgryglfwxt1.njga.gov.cn:20002/xyt/resource/',
            // modelUrl:'http://50.32.9.22:80/xyt/resource/',
            typeCode: '',
            roleCode: '',
            leftopen: '缩放',
        }
    },
    created() {
        // console.log('modelUrl--------->:',this.modelUrl);
        this.requestToken = localStorage.getItem("token");
        let userinfo = JSON.parse(localStorage.getItem("userinfo"));
        this.typeCode = userinfo.typeCode;
        this.roleCode = userinfo.roleCode;
        // this.requestToken = localStorage.getItem("token");
    },
    mounted() { },
    methods: {
        // 展示loading
        showLoading(text) {
            let textValue = text || '操作中';
            this.loadingFlag = this.$loading({
                lock: true,
                text: `${textValue}`,
                spinner: 'el-icon-loading',
                background: 'rgba(0,0,0,0.3)'
            })
        },
        // 隐藏loading
        hideLoading() {
            this.loadingFlag.close();
        }
    }
}
export default myMixin